package com.nightpiter.model.objects;

/**
 * Tunnel class
 * 
 * @author Eldar Abusalimov (eldar.abusalimov@gmail.com)
 */
public class Tunnel extends Transition {
	/**
	 * the Line to which Tunnel belongs
	 */
	protected Line line;

	protected boolean smooth;

	/**
	 * public constructor
	 * 
	 * @param fromStation
	 * @param toStation
	 * @param time -
	 *            time is seconds between fromStation and toStation
	 * @param line -
	 *            Tunnel line
	 * @param smooth -
	 *            define tunnel smoothing
	 */
	public Tunnel(Station fromStation, Station toStation, int time, Line line,
			boolean smooth) {
		super(fromStation, toStation, time);
		this.line = line;
		fromStation.addLine(line);
		toStation.addLine(line);
		this.smooth = smooth;
	}

	/**
	 * @return the line
	 */
	public Line getLine() {
		return line;
	}

	public boolean isSmooth() {
		return smooth;
	}

}
